package org.micode.common.domain.base;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

/**
 * 实体基类
 *
 * @param <KT> 主键的类型
 */
@Data
public abstract class BaseEntity<KT> {

    public BaseEntity() {
        initForNewEntity();
    }

    @JsonIgnore
    public abstract KT getKeyValue();

    public abstract void checkBeforeInsert();

    protected void initForNewEntity() {

    };

}
